package com.example.emos.wx.config.shiro;

import org.apache.shiro.authc.AuthenticationToken;

/**
 * @ClassName OAuth2Token
 * @Author zhangzhixi
 * @Description 客户端提交的Token不能直接交给Shiro框架，需要先封装成AuthenticationToken类型的对象。
 * @Date 2022/8/18 18:23
 * @Version 1.0
 */
public class OAuth2Token implements AuthenticationToken {

    private String token;

    public OAuth2Token(String token) {
        this.token = token;
    }

    @Override
    public Object getPrincipal() {
        return token;
    }

    @Override
    public Object getCredentials() {
        return token;
    }
}

